﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
      Id="Ribbon.List.WorkspacesGroup"
      Location="CommandUI.Ribbon"
      RegistrationId="10099"
      RegistrationType="List">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Templates._children">
          <GroupTemplate Id="Custom.Ribbon.Templates.Flexible">
            <Layout Title="Large">
              <OverflowSection Type="OneRow" TemplateAlias="o1" DisplayMode="Large"/>
            </Layout>
            <Layout Title="Medium">
              <OverflowSection Type="ThreeRow" TemplateAlias="o1" DisplayMode="Medium"/>
            </Layout>
            <Layout Title="MediumTwoRow">
              <OverflowSection Type="TwoRow" TemplateAlias="o1" DisplayMode="Medium" />
            </Layout>
            <Layout Title="Small">
              <OverflowSection Type="ThreeRow" TemplateAlias="o1" DisplayMode="Small" />
            </Layout>
            <Layout Title="Popup" LayoutTitle="Large" />
          </GroupTemplate>
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.List.Scaling._children">
          <MaxSize Id="Ribbon.List.WorkspacesGroup.Group.MaxSize"
            Sequence="15"
            GroupId="Ribbon.List.WorkspacesGroup.Group"
            Size="Large" />
        </CommandUIDefinition>
        <CommandUIDefinition Location="Ribbon.List.Groups._children">
          <Group
            Id="Ribbon.List.WorkspacesGroup.Group"
            Sequence="55"
            Description="$Resources:SPM.Resources, CAA_RibbonGroupDesc"
            Title="$Resources:SPM.Resources, CAA_RibbonGroupTitle"
            Template="Custom.Ribbon.Templates.Flexible">
            <Controls Id="Ribbon.List.WorkspacesGroup.Group.Controls">
              <Button Id="Ribbon.List.WorkspacesGroup.Group.ResetButton"
                  TemplateAlias="o1"
                  Command="ResetWorkspacesList"
                  LabelText="$Resources:SPM.Resources, CAA_ResetWorkspacesList"
                  Image32by32="/_layouts/AutoTagging/images/resetWorkspacesList.png"
                  Image16by16="/_layouts/AutoTagging/images/16x16dummy.png"
                  Sequence="18"/>
              <Button Id="Ribbon.List.WorkspacesGroup.Group.WorkspacesSettingsButton"
                  TemplateAlias="o1"
                  Command="WorkspacesSettings"
                  LabelText="$Resources:SPM.Resources, CAA_WorkspacesSettings"
                  Image32by32="/_layouts/AutoTagging/images/workspacesSettings.png"
                  Image16by16="/_layouts/AutoTagging/images/16x16dummy.png"
                  Sequence="15"/>
            </Controls>
          </Group>
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler Command ="ResetWorkspacesList"
                          CommandAction="~sitecollection/_layouts/AutoTagging/ResetWorkspacesList.aspx" />
        <CommandUIHandler Command ="WorkspacesSettings"
                          CommandAction="~sitecollection/_layouts/AutoTagging/WorkspacesSettings.aspx" />
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
</Elements>
